package com.example.android_practice.lifeCycle;

import androidx.lifecycle.LifecycleService;

/**
 * Created by tangcan on 20/9/26.
 * 修改人：tangcan
 * 修改时间：20/9/26 上午10:26
 * 修改备注：
 */
public class MyService extends LifecycleService {

    private MyServiceObserver myServiceObserver;

    public MyService(){
        myServiceObserver=new MyServiceObserver();
        //将观察者与被观察者绑定
        getLifecycle().addObserver(myServiceObserver);
    }

}
